package com.example.netchat;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class ApiKeyInitializer implements ServletContextListener {

	static final String ATTRIBUTE_ACCESS_KEY = "apiKey";

	public void contextInitialized(ServletContextEvent event) {
		String key = getKey();
		event.getServletContext().setAttribute(ATTRIBUTE_ACCESS_KEY, key);
	}

	/**
	 * Gets the access key.
	 */
	protected String getKey() {
		return "AIzaSyBoWnV5Y-26laYD4wQHi8N-nGmoA_a2Dog";
	}

	public void contextDestroyed(ServletContextEvent event) {
	}
}
